package com.ruoyi.app.controller.register;

import com.ruoyi.app.business.register.RegisterBusiness;
import com.ruoyi.app.domain.register.DemanderRegister;
import com.ruoyi.app.domain.register.LaborRegister;
import com.ruoyi.common.core.web.domain.APIResult;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户注册
 *
 * @author Zane
 * @since 2025-09-27
 */
@RestController
@RequestMapping("/register/")
public class RegisterController {

  @Resource
  private RegisterBusiness registerBusiness;

  /**
   * 项目方注册
   *
   */
  @PostMapping("demander")
  public APIResult<Void> registerDemander(@Validated @RequestBody DemanderRegister demanderRegister) {
    registerBusiness.registerDemander(demanderRegister);
    return APIResult.success();
  }

  /**
   * 劳务方注册
   *
   */
  @PostMapping("labor")
  public APIResult<Void> registerLabor(@Validated @RequestBody LaborRegister laborRegister) {
    registerBusiness.registerLabor(laborRegister);
    return APIResult.success();
  }



}
